package com.fuqiang.nightshopumsmodel.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @Description:后台用户权限表
 * @author fuqiang
 * @since 2020-04-14
 */
@ApiModel(value ="后台用户权限表")
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("ums_permission")
public class UmsPermission implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "父级权限id")
    @TableField("pid")
    private Long pid;
    @ApiModelProperty(value = "名称")
    @TableField("name")
    private String name;
    @ApiModelProperty(value = "权限值")
    @TableField("value")
    private String value;
    @ApiModelProperty(value = "图标")
    @TableField("icon")
    private String icon;
    @ApiModelProperty(value = "权限类型：0->目录；1->菜单；2->按钮（接口绑定权限）")
    @TableField("type")
    private Integer type;
    @ApiModelProperty(value = "前端资源路径")
    @TableField("uri")
    private String uri;
    @ApiModelProperty(value = "启用状态；0->禁用；1->启用")
    @TableField("status")
    @TableLogic
    private Integer status;
    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;
    @ApiModelProperty(value = "排序")
    @TableField("sort")
    private Integer sort;


    public static final String ID = "id";

    public static final String PID = "pid";

    public static final String NAME = "name";

    public static final String VALUE = "value";

    public static final String ICON = "icon";

    public static final String TYPE = "type";

    public static final String URI = "uri";

    public static final String STATUS = "status";

    public static final String CREATE_TIME = "create_time";

    public static final String SORT = "sort";

}
